using System;
using ZhCun.DbCore.Entitys;

namespace ZhCun.DBModel
{
	public partial class Sys_GridCombox_Column : EntityBase
	{
		private System.String _Id;
		/// <summary>
		/// Id
		/// </summary>
		[Entity(ColumnName = CNId, IsPrimaryKey = true, IsNotNull = true)]
		public System.String Id
		{
			get { return _Id; }
			set
			{
				_Id = value;
				base.SetFieldChanged(CNId) ;
			}
		}

		private System.String _MainId;
		/// <summary>
		/// MainId
		/// </summary>
		[Entity(ColumnName = CNMainId, IsNotNull = true)]
		public System.String MainId
		{
			get { return _MainId; }
			set
			{
				_MainId = value;
				base.SetFieldChanged(CNMainId) ;
			}
		}

		private System.Int32 _ColumnIndex;
		/// <summary>
		/// 列顺序，不能重复，排序
		/// </summary>
		[Entity(ColumnName = CNColumnIndex, IsNotNull = true)]
		public System.Int32 ColumnIndex
		{
			get { return _ColumnIndex; }
			set
			{
				_ColumnIndex = value;
				base.SetFieldChanged(CNColumnIndex) ;
			}
		}

		private System.String _ColumnCaption;
		/// <summary>
		/// 列标题
		/// </summary>
		[Entity(ColumnName = CNColumnCaption, IsNotNull = true)]
		public System.String ColumnCaption
		{
			get { return _ColumnCaption; }
			set
			{
				_ColumnCaption = value;
				base.SetFieldChanged(CNColumnCaption) ;
			}
		}

		private System.String _FiledName;
		/// <summary>
		/// 字段名
		/// </summary>
		[Entity(ColumnName = CNFiledName, IsNotNull = true)]
		public System.String FiledName
		{
			get { return _FiledName; }
			set
			{
				_FiledName = value;
				base.SetFieldChanged(CNFiledName) ;
			}
		}

		private System.Boolean _IsVisible;
		/// <summary>
		/// IsVisible
		/// </summary>
		[Entity(ColumnName = CNIsVisible, IsNotNull = true)]
		public System.Boolean IsVisible
		{
			get { return _IsVisible; }
			set
			{
				_IsVisible = value;
				base.SetFieldChanged(CNIsVisible) ;
			}
		}

		private System.Int32 _ColumnWidth;
		/// <summary>
		/// 列宽,默认为0，表示自适应
		/// </summary>
		[Entity(ColumnName = CNColumnWidth, IsNotNull = true)]
		public System.Int32 ColumnWidth
		{
			get { return _ColumnWidth; }
			set
			{
				_ColumnWidth = value;
				base.SetFieldChanged(CNColumnWidth) ;
			}
		}

		private System.String _FormatStr;
		/// <summary>
		/// 值格式化显示
		/// </summary>
		[Entity(ColumnName = CNFormatStr)]
		public System.String FormatStr
		{
			get { return _FormatStr; }
			set
			{
				_FormatStr = value;
				base.SetFieldChanged(CNFormatStr) ;
			}
		}

		private System.String _Alignment;
		/// <summary>
		/// 对齐方式
		/// </summary>
		[Entity(ColumnName = CNAlignment)]
		public System.String Alignment
		{
			get { return _Alignment; }
			set
			{
				_Alignment = value;
				base.SetFieldChanged(CNAlignment) ;
			}
		}

		private System.String _AutoSizeMode;
		/// <summary>
		/// 列大小模式
		/// </summary>
		[Entity(ColumnName = CNAutoSizeMode)]
		public System.String AutoSizeMode
		{
			get { return _AutoSizeMode; }
			set
			{
				_AutoSizeMode = value;
				base.SetFieldChanged(CNAutoSizeMode) ;
			}
		}

		private System.String _ColumnType;
		/// <summary>
		/// 列类型，0：文本，1：数字（左对齐），2：CheckBox
		/// </summary>
		[Entity(ColumnName = CNColumnType, IsNotNull = true)]
		public System.String ColumnType
		{
			get { return _ColumnType; }
			set
			{
				_ColumnType = value;
				base.SetFieldChanged(CNColumnType) ;
			}
		}

		private System.DateTime _AddTime;
		/// <summary>
		/// AddTime
		/// </summary>
		[Entity(ColumnName = CNAddTime, IsNotNull = true)]
		public System.DateTime AddTime
		{
			get { return _AddTime; }
			set
			{
				_AddTime = value;
				base.SetFieldChanged(CNAddTime) ;
			}
		}

		private System.String _AddUserId;
		/// <summary>
		/// AddUserId
		/// </summary>
		[Entity(ColumnName = CNAddUserId)]
		public System.String AddUserId
		{
			get { return _AddUserId; }
			set
			{
				_AddUserId = value;
				base.SetFieldChanged(CNAddUserId) ;
			}
		}

		private System.String _AddHost;
		/// <summary>
		/// AddHost
		/// </summary>
		[Entity(ColumnName = CNAddHost)]
		public System.String AddHost
		{
			get { return _AddHost; }
			set
			{
				_AddHost = value;
				base.SetFieldChanged(CNAddHost) ;
			}
		}

		private System.DateTime? _LastTime;
		/// <summary>
		/// LastTime
		/// </summary>
		[Entity(ColumnName = CNLastTime)]
		public System.DateTime? LastTime
		{
			get { return _LastTime; }
			set
			{
				_LastTime = value;
				base.SetFieldChanged(CNLastTime) ;
			}
		}

		private System.String _LastHost;
		/// <summary>
		/// LastHost
		/// </summary>
		[Entity(ColumnName = CNLastHost)]
		public System.String LastHost
		{
			get { return _LastHost; }
			set
			{
				_LastHost = value;
				base.SetFieldChanged(CNLastHost) ;
			}
		}

		private System.String _LastUserId;
		/// <summary>
		/// LastUserId
		/// </summary>
		[Entity(ColumnName = CNLastUserId)]
		public System.String LastUserId
		{
			get { return _LastUserId; }
			set
			{
				_LastUserId = value;
				base.SetFieldChanged(CNLastUserId) ;
			}
		}

		#region 字段名的定义
		public const string CNId = "Id";
		public const string CNMainId = "MainId";
		public const string CNColumnIndex = "ColumnIndex";
		public const string CNColumnCaption = "ColumnCaption";
		public const string CNFiledName = "FiledName";
		public const string CNIsVisible = "IsVisible";
		public const string CNColumnWidth = "ColumnWidth";
		public const string CNFormatStr = "FormatStr";
		public const string CNAlignment = "Alignment";
		public const string CNAutoSizeMode = "AutoSizeMode";
		public const string CNColumnType = "ColumnType";
		public const string CNAddTime = "AddTime";
		public const string CNAddUserId = "AddUserId";
		public const string CNAddHost = "AddHost";
		public const string CNLastTime = "LastTime";
		public const string CNLastHost = "LastHost";
		public const string CNLastUserId = "LastUserId";
		#endregion

	}
}
